﻿using System.Collections.Generic;
using UnityEngine;

public class ObjectData
{
    public int id;
    public Vector2 pos;
}

public class SampleObjectModel
{
    private static Dictionary<int, ObjectData> dic = new Dictionary<int, ObjectData>();

    /// <summary>
    /// 创建测试数据
    /// </summary>
    public static void BuildSample()
    {
        dic.Clear();
        dic.Add(1, new ObjectData() { id = 1, pos = new Vector2(300, 300) });
    }

    /// <summary>
    /// 获取测试数据
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    public static ObjectData GetData(int id)
    {
        return dic[id];
    }

    public static Dictionary<int, ObjectData>.ValueCollection GetDatas()
    {
        return dic.Values;
    }
}
